<%--
  Created by IntelliJ IDEA.
  User: libing
  Date: 2016/7/23
  Time: 12:54
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@taglib uri="http://www.rapid-framework.org.cn/rapid" prefix="rapid" %>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>companyDetails</title>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/details.css"/>
    <script type="text/javascript">
        function editCompanyAllSubmit(){
            //提交form
            alert("yes");
            document.companyInfo.action="${pageContext.request.contextPath }/admin/returnCompanyUsers.action?page=1";
            document.companyInfo.submit();
        }
        function changeStatus() {
            document.companyDetail.action = "${pageContext.request.contextPath }/admin/changeStatus.action?status=${companyDetail.company.sStatus}&id=${companyDetail.company.companyId}&flag=1";
            document.companyDetail.submit();
        }
    </script>
</head>
<body>
<%--<rapid:override name="top">
这里如果不想改变父页面的内容的话，就不要写出来了，否则会认为你重写了父页面的这个top
</rapid:override>--%>
<div class="container clearfix">

    <rapid:override name="main_wrap">
        <div class="right_content">
            <div class="gs_name">
                <form id="itemhead" enctype="multipart/form-data"
                      action="${pageContext.request.contextPath }/admin/editCompanyHeadImg.action"
                      method="post">
                    <c:if test="${companyDetail.logo != null}">
                        <img src="/${companyDetail.logo}" width=200
                             height=200/>
                        <br/>
                    </c:if>
                    <input type="hidden" name="companydetailId"
                           value="${companyDetail.companydetailId}">
                    <input type="hidden" name="companyId"
                           value="${companyDetail.company.companyId}">
                    <input type="file" name="companyImg"/>
                    <div class="page" id="ppp1">
                        <input type="submit" name="" value="保存">
                    </div>

                </form>
            </div>

            <div class="company" id="companyUserInfo">

                <div class="common_title">
                    企业用户信息
                </div>
                <form action="${pageContext.request.contextPath }/admin/editAllCompanyInfo.action?companyId=${companyDetail.company.companyId}" name="companyInfo" method="post">
                <table>
                    <tr>
                        <td  class="first_item">公司名称</td>
                        <td class="second_item"><input type="text" name="companyName" class="input" value="${companyDetail.company.companyName}"/></td>
                    </tr>
                    <tr>
                        <td class="first_item">所在城市</td>
                        <td class="second_item"><input type="text" name="cityName" class="input" value="${companyDetail.company.city.cityName}"/></td>
                    </tr>
                    <tr>
                        <td class="first_item">联系人</td>
                        <td class="second_item"><input type="text" name="contacterName" class="input" value="${companyDetail.company.contacterName}"/></td>
                    </tr>
                    <tr>
                        <td class="first_item">性别</td>
                        <td class="second_item"><input type="text" name="sex" class="input" value="<c:choose><c:when test="${companyDetail.company.contacterSex == 0}">男</c:when><c:otherwise>女</c:otherwise></c:choose>"/>
                        </td>
                    </tr>
                    <tr>
                        <td class="first_item">区号</td>
                        <td class="second_item"><input type="text" name="zomeNum" class="input" value="${companyDetail.company.zomeNum}"/></td>
                    </tr>
                    <tr>
                        <td class="first_item">固定电话</td>
                        <td class="second_item"><input type="text" name="phoneNum" class="input" value="${companyDetail.company.phoneNum}"/></td>
                    </tr>
                    <tr>
                        <td class="first_item">移动电话</td>
                        <td class="second_item"><input type="text" name="telephoneNum" class="input" value="${companyDetail.company.telephoneNum}"/></td>
                    </tr>
                    <tr>
                        <td class="first_item">全名</td>
                        <td class="second_item"><input type="text" name="fullName" class="input" value="${companyDetail.company.fullName}"/></td>
                    </tr>
                    <tr>
                        <td class="first_item">邮箱</td>
                        <td class="second_item"><input type="text" name="eEmail" class="input" value="${companyDetail.company.eEmail}"/></td>
                    </tr>
                    <tr>
                        <td class="first_item">ip地址</td>
                        <td class="second_item"><input type="text" name="ipaddress" class="input" value="${companyDetail.company.ipaddress}"/></td>
                    </tr>
                    <tr>
                        <td class="first_item">添加日期</td>
                        <td class="second_item"><input type="text" name="dateAdded" class="input" value="${companyDetail.company.dateAdded}"/></td>
                    </tr>
                    <tr>
                        <td class="first_item">修改日期</td>
                        <td class="second_item"><input type="text" name="dateModified" class="input" value="${companyDetail.company.dateModified}"/></td>
                    </tr>
                    <tr>
                        <td class="first_item">状态</td>
                        <td class="second_item">
                            <input type="text" name="status" class="input" value="<c:choose><c:when test="${companyDetail.company.sStatus == 0}">正常状态</c:when><c:otherwise>已被封号</c:otherwise></c:choose>"/>
                        </td>
                    </tr>
                </table>
                <div class="page" id="page1">
                    <div class="inner_input inner_input1">
                        <input type="submit" name="" value="保存"/>
                    </div>
                </div>
                </form>
            </div>

            <div class="company" id="companyDetails">
                <div class="common_title">
                    企业认证信息
                </div>
                <form id="itemsform" enctype="multipart/form-data"
                        action="${pageContext.request.contextPath}/admin/editCompanyDetails.action" method="post" name="companyDetail">
                    <table>
                        <input type="hidden" name="companydetailId"
                               value="${companyDetail.companydetailId}"/>
                        <input type="hidden" name="companyId"
                               value="${companyDetail.company.companyId}"/>
                        <tr>
                            <td class="first_item">主要行业</td>
                            <td class="second_item"><input type="text" name="mainIndustryName" class="input" value="${companyDetail.mainIndustry.nName}"/></td>
                        </tr>
                        <tr>
                            <td class="first_item">次要行业</td>
                            <td class="second_item">
                                <input type="text" name="secIndustryName" class="input" value="<c:forEach items="${companyDetail.secIndustrys}" var="sec">${sec.nName}/</c:forEach>"/>
                            </td>
                        </tr>
                        <tr>
                            <td class="first_item">公司性质</td>
                            <td class="second_item"><input type="text" name="compamyPropertyName" class="input" value="${companyDetail.companyProperty.nName}"/></td>
                        </tr>
                        <tr>
                            <td class="first_item">公司规模</td>
                            <td class="second_item"><input type="text" name="companySizeName" class="input" value="${companyDetail.companySize.nName}"/></td>
                        </tr>
                        <tr>
                            <td class="first_item">公司介绍</td>
                            <td class="second_item"><input type="text" name="introduces" class="input" value="${companyDetail.introduces}"/></td>
                        </tr>
                        <tr>
                            <td class="first_item">公司联系人</td>
                            <td class="second_item"><input type="text" name="recruitContacter" class="input" value="${companyDetail.recruitContacter}"/></td>
                        </tr>
                        <tr>
                            <td class="first_item">区号</td>
                            <td class="second_item"><input type="text" name="zomeNum" class="input" value="${companyDetail.zomeNum}"/></td>
                        </tr>
                        <tr>
                            <td class="first_item">固定电话</td>
                            <td class="second_item"><input type="text" name="phoneNum" class="input" value="${companyDetail.phoneNum}"/></td>
                        </tr>
                        <tr>
                            <td class="first_item">移动电话</td>
                            <td class="second_item"><input type="text" name="telephoneNum" class="input" value="${companyDetail.telephoneNum}"/></td>
                        </tr>
                        <tr>
                            <td class="first_item">公司地址</td>
                            <td class="second_item"><input type="text" name="aAddress" class="input" value="${companyDetail.aAddress}"/></td>
                        </tr>
                        <tr>
                            <td class="first_item">营业执照</td>
                            <td>
                                <c:if test="${companyDetail.licenceUrl != null}">
                                    <img src="/${companyDetail.licenceUrl}" width=100 height=100/>
                                    <br/>
                                </c:if>
                                <input type="file" name="companyLicenceUrl"/>
                            </td>
                        </tr>
                        <tr>
                            <td class="first_item">认证日期</td>
                            <td class="second_item"><input type="text" name="dateAdded" class="input" value="${companyDetail.dateAdded}"/></td>
                        </tr>
                        <tr>
                            <td class="first_item">修改日期</td>
                            <td class="second_item"><input type="text" name="dateModified" class="input" value="${companyDetail.dateModified}"/></td>
                        </tr>
                    </table>
                    <div class="page" id="page2">
                        <div class="inner_input inner_input2">
                            <input type="submit" name="" value="保存"/>
                            <input type="button" name="" onclick="changeStatus()" value="<c:choose><c:when test="${companyDetail.company.sStatus == 0}">已认证</c:when><c:otherwise>认证</c:otherwise></c:choose>"/>
                        </div>
                    </div>
                </form>

        </div>
    </rapid:override>

</div>

</body>
</html>
<%@include file="../common/templateJSP.jsp"%>
